<!DOCTYPE html>
<html>
<head>
    <#import "../common/common.macro.ftl" as netCommon>
    <@netCommon.commonStyle />
    <!-- DataTables -->
    <link rel="stylesheet" href="${request.contextPath}/static/adminlte/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
    <link rel="stylesheet" href="${request.contextPath}/static/layui/css/layui.css">
    <link rel="stylesheet" href="${request.contextPath}/static/layui_ext/dtree/dtree.css">
    <link rel="stylesheet" href="${request.contextPath}/static/layui_ext/dtree/font/dtreefont.css">
    <link rel="stylesheet" href="${request.contextPath}/static/css/jobFileDir.css">
    <title>${I18n.admin_name}</title>
</head>
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && cookieMap["xxljob_adminlte_settings"]?exists && "off" == cookieMap["xxljob_adminlte_settings"].value >sidebar-collapse</#if>">
<div class="wrapper">
    <!-- header -->
    <@netCommon.commonHeader />
    <!-- left -->
    <@netCommon.commonLeft "jobFileDir" />

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>整合列表</h1>
        </section>
        <div class="layui-side" style="border: 1px solid #e7eaef;background:#F5F6FA">
            <div class="layuiBodyHeader72">
<#--                <label class="layui-form-label" style="text-align: unset">-->
<#--                    资源库</label>-->
                <div class="xm-select-demo" id="datasourceId">
                    <!--<select class="layui-select" id="datasourceId" name="targetDatasourceId"-->
                    <!--lay-filter="demo" >-->
                    <!--<option value="">请选择资源库</option>-->
                    <!--</select>-->
                    <select class="form-control" id="repSelect">
                        <option value="0" selected>请选择资源库</option>
                        <#list repList as group>
                            <option value="${group.id}" >${group.repName}</option>
                        </#list>
                    </select>
                </div>
                <button id="addDir" type="button" class="layui-btn">
                    新增目录
                </button>
            </div>
            <div class="layui-row">
                <ul id="ODSmenuTree" class="dtree"></ul>
            </div>
        </div>
        <div class="rightRow" style="margin-left: 300px">
            <button id="addScript" type="button" class="layui-btn">
                新增脚本
            </button>
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body" >
                        <table id="job_fileDir_list" class="table table-bordered table-striped" width="100%" >
                            <thead>
                            <tr>
                                <th name="id" >id</th>
                                <th name="text" >脚本名称</th>
                                <th name="extra" >脚本路径</th>
                                <th name="objectType" >类型</th>
                                <th>${I18n.system_opt}</th>
                            </tr>
                            </thead>
                            <tbody></tbody>
                            <tfoot></tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 新增.模态框 -->
    <div class="modal fade" id="addDirModal" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog ">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" >新增目录</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form" role="form" >
                        <div class="form-group">
                            <label class="col-sm-3 control-label required" for="name">节点名称：<font color="red">*</font></label>
                            <div class="col-sm-7">
                                <input name="name" type="text" placeholder="请输入节点名称" class="form-control" aria-required="true">
                            </div>
                            <input type="hidden" name="dirId" />
                            <input type="hidden" name="repId" />
                        </div>
                        <hr>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-6">
                                <button type="submit" class="btn btn-primary"  >${I18n.system_save}</button>
                                <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="addScriptModal" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog ">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" >新增脚本</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form" role="form" >
                        <div class="form-group">
                            <label class="col-sm-3 control-label required" for="name">脚本名称：<font color="red">*</font></label>
                            <div class="col-sm-7">
                                <input name="name" type="text" placeholder="请输入脚本名称" class="form-control" aria-required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label required" for="type">脚本类型：<font color="red">*</font></label>
                            <div class="col-sm-4">
                                <select class="form-control" name="createType" >
                                    <option value="0" >作业</option>
                                    <option value="1" >转换</option>
                                </select>
                            </div>
                            <input type="hidden" name="dirId" />
                            <input type="hidden" name="repId" />
                        </div>
                        <hr>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-6">
                                <button type="submit" class="btn btn-primary"  >${I18n.system_save}</button>
                                <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- 更新.模态框 -->
    <div class="modal fade" id="updateDirModal" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog ">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" >编辑目录</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form" role="form" >
                        <div class="form-group">

                            <label class="col-sm-3 control-label required" for="name">节点名称：<font color="red">*</font></label>
                            <div class="col-sm-7">
                                <input name="name" type="text" placeholder="请输入节点名称" class="form-control" aria-required="true">
                            </div>
                            <input type="hidden" name="dirId" />
                            <input type="hidden" name="repId" />
                        </div>
                        <hr>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-6">
                                <button type="submit" class="btn btn-primary"  >${I18n.system_save}</button>
                                <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="updateScriptModal" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog ">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" >修改目录</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form" role="form" >
                        <div class="form-group">
                            <input type="hidden" name="dirId" />
                            <input type="hidden" name="repId" />
                            <input type="hidden" name="type" />
                            <input type="hidden" name="scriptId" />
                            <label class="col-sm-3 control-label required" for="name">节点名称：<font color="red">*</font></label>
                            <div class="col-sm-7">
                                <input name="name" type="text" placeholder="请输入节点名称" class="form-control" aria-required="true">
                            </div>
                        </div>

                        <hr>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-6">
                                <button type="submit" class="btn btn-primary"  >${I18n.system_save}</button>
                                <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- footer -->
    <@netCommon.commonFooter />
</div>

<@netCommon.commonScript />
<!-- DataTables -->
<script src="${request.contextPath}/static/adminlte/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="${request.contextPath}/static/adminlte/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- moment -->
<script src="${request.contextPath}/static/adminlte/bower_components/moment/moment.min.js"></script>
<#-- cronGen -->
<script src="${request.contextPath}/static/plugins/cronGen/cronGen<#if I18n.admin_i18n?default('')?length gt 0 >_${I18n.admin_i18n}</#if>.js"></script>
<#--<script src="${request.contextPath}/static/js/cron-generator/cronGen.js"></script>-->
<script type="text/javascript" src="${request.contextPath}/static/layui/layui.js"></script>
<script src="${request.contextPath}/static/js/jobFileDir.index.1.js"></script>
<script>

</script>
</body>
</html>
